package com.huawei.hwCloudJs.service.locationapi;

import android.content.Context;
import com.huawei.hwCloudJs.core.JsCallback;
import com.huawei.hwCloudJs.service.locationapi.a.a;
import com.huawei.hwCloudJs.service.locationapi.bean.LocOption;
import com.huawei.hwCloudJs.support.b.b;
import com.huawei.hwCloudJs.support.b.d;

class GetLocationApi$3 implements b<a> {
    final /* synthetic */ Context a;
    final /* synthetic */ LocOption b;
    final /* synthetic */ JsCallback c;
    final /* synthetic */ GetLocationApi d;

    GetLocationApi$3(GetLocationApi getLocationApi, Context context, LocOption locOption, JsCallback jsCallback) {
        this.d = getLocationApi;
        this.a = context;
        this.b = locOption;
        this.c = jsCallback;
    }

    public boolean a(a aVar) {
        if (com.huawei.hwCloudJs.b.o == aVar.a() && GetLocationApi.a(this.d, aVar.b())) {
            GetLocationApi.b(this.d, this.a, this.b, this.c);
        } else {
            this.c.failure(1, "locationPermissionCheck false!");
        }
        return false;
    }

    public /* synthetic */ boolean onReceive(d dVar) {
        return a((a) dVar);
    }
}
